﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace LightSO.CMS.Model.EasyUI
{
    public class PopMenuItem : Button
    {
        /// <summary>
        /// Button的栏位构造方法
        /// </summary>
        /// <param name="id">表格Id</param>
        /// <param name="title">显示名称</param>
        public PopMenuItem(string id, string title, string onClick, string icon, bool plain) : base(id, title, onClick, icon, plain) { }

        public override System.Web.Mvc.MvcHtmlString ToHtml()
        {
            var str = string.Format("<div id=\"menu{0}\" onclick=\"{1}\" data-options=\"iconCls:'{2}'\">{3}</div>",
                Id, OnClick, Icon, Title);

            return new MvcHtmlString(str);
        }
    }
}